<extend name="Index/index"/>
<block name='right'>
<div class="rightBody">
	<span class='title'>编辑地区</span>
	<div id="content">
		<form  class='registerform' action="<{:U('Locality/edit_handle')}>" method="post">
		<table class='table table-striped table-bordered'>
			<thead>
				<tr>
					<th width="20%">名称</th>
					<th>值</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>所属地区</td>
					<td>
						<select name="pid" id="">
							<option value="0">顶级地区</option>
							<volist name="rows" id="row">
							<if condition="$datarow['pid'] eq $row['lid']">
								<option value="<{$row['lid']}>" selected>|<{$row['html']}><{$row['lname']}></option>
							<else/>
								<option value="<{$row['lid']}>">|<{$row['html']}><{$row['lname']}></option>
							</if>
							</volist>
						</select>
					</td>
				</tr>
				<tr>
					<td>地区名称</td>
					<td>
						<input type="text" name="lname" value="<{$datarow['lname']}>" datatype="*2-6" errormsg="长度2-6位任意字符"  nullmsg="地区名称不能为空" sucmsg="填写正确"/>
						<span class="Validform_checktip" >请输入2-6位任意字符</span>
					</td>
				</tr>
				
				<tr>
					<td>地区排序</td>
					<td>
						<input name="sort" value="<{$datarow['sort']}>" type="text" datatype="n1-100" nullmsg="排序不能为空"  errormsg="长度100个字符内" sucmsg="填写正确"/>
						<span class="Validform_checktip">必须为数字</span>
					</td>
				</tr>
				<tr>
					<td>是否显示</td>
					<td>
						<if condition="$datarow['display'] eq 0">
							<lable>
								<input type="radio" name="display"   value="1"/>	
								<span>显示</span>
							</lable>
							<lable>
								<input type="radio" name="display" checked value="0"/>	
								<span>隐藏</span>
							</lable>
						<else/>
							<lable>
								<input type="radio" name="display" checked   value="1"/>	
								<span>显示</span>
							</lable>
							<lable>
								<input type="radio" name="display"  value="0"/>	
								<span>隐藏</span>
							</lable>
						</if>
					</td>
				</tr>
				<input type="hidden" name="lid" value="<{$datarow['lid']}>">
				<tr>
					<td></td>
					<td><input type="submit" class='btn btn-primary'  value="修改" /></td>
				</tr>
			</tbody>
		</table>
		</form>
	</div>
</div>
</block>
